package mystudy.oop;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

public class excerise1 {
    public  static void main(String[] args)
    {
        int times;
        int guess;
        while(times<=3) {
            System.out.println("请输入你猜的数是几：");
            if (scan.hasNextInt()) {
                guess = scan.nestInt();
                if (guess == num) {
                    System.out.println("恭喜猜对。");
                    break;
                } else {
                    times++;
                }
            }
            if (times == 4) {
                System.out.println("三次都未猜中");
            }
            System.out.println("Game over");
        }
    }
}
